/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.basic.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 企业人员信息
 *
 * @author pig
 * @date 2024-02-20 13:41:07
 */
@Data
@TableName("closed_pserson_company")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "企业人员信息")
public class ClosedPersonCompanyEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="ID")
    private Long id;

	/**
	* 用户Id
	*/
    @Schema(description="用户Id")
    private String uid;

	/**
	* 岗位Id
	*/
    @Schema(description="岗位Id")
    private String postId;

	/**
	* 岗位名称
	*/
    @Schema(description="岗位名称")
    private String postName;

	/**
	* 部门Id
	*/
    @Schema(description="部门Id")
    private String departId;

	/**
	* 部门名称
	*/
    @Schema(description="部门名称")
    private String departName;

	/**
	* 员工姓名
	*/
    @Schema(description="员工姓名")
    private String name;

	/**
	* 员工性别
	*/
    @Schema(description="员工性别")
    private String sex;

	/**
	* 定位卡号
	*/
    @Schema(description="定位卡号")
    private String cardNo;

	/**
	* 定位卡类型
	*/
    @Schema(description="定位卡类型")
    private String employeeType;

	/**
	* 统一社会信用代码
	*/
    @Schema(description="统一社会信用代码")
    private String companySocialCode;

	/**
	* 最近同步时间
	*/
    @Schema(description="最近同步时间")
    private Date lastSyncTime;

	/**
	* 最近定位时间
	*/
    @Schema(description="最近定位时间")
    private Date lastPositionTime;

	/**
	* 账号Id
	*/
    @Schema(description="账号Id")
    private Long accountId;

	/**
	* 审核状态
	*/
    @Schema(description="审核状态")
    private Integer auditStatus;

	/**
	* 审核结果描述
	*/
    @Schema(description="审核结果描述")
    private String auditResultDesc;

	/**
	 * 申请人Id
	 */
	@Schema(description="申请人Id")
	private Long applyUserId;

	/**
	* 申请时间
	*/
    @Schema(description="申请时间")
    private Date applyTime;

	/**
	* 审核时间
	*/
    @Schema(description="审核时间")
    private Date auditTime;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remark;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}


	public String getSexStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.gender, this.getSex());
	}

	public String getEmployeeTypeStr() {
		return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_employee_Type, this.getEmployeeType());
	}

	public String getAuditStatusStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_person_audit_status, this.getAuditStatus());
	}
}
